package com.turnengine.client.common.command.gwt.serialization;

import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.server.rpc.SerializationPolicy;

// Base serialization policy which allows everything.
public class AllowAllSerializationPolicy extends SerializationPolicy {

	@Override
	public boolean shouldDeserializeFields(Class<?> clazz) {
		// Check against whitelist, return true if there..
		return true;
	}

	@Override
	public boolean shouldSerializeFields(Class<?> clazz) {
		// Check against whitelist, return true if there..
		return true;
	}

	@Override
	public void validateDeserialize(Class<?> clazz) throws SerializationException {
		// Would throw a SerializationException if we can't validate (Check against 'Whitelist')
	}

	@Override
	public void validateSerialize(Class<?> clazz) throws SerializationException {
		// Would throw a SerializationException if we can't validate (Check against 'Whitelist')
	}

}